import { useState } from 'react'

const Room = () => {
  // tuple
  let [light, setLight] = useState(false)

  return (
    <>
      <h3>屋子：{!light ? '灯关了' : '灯打开了'}</h3>
      <button onClick={() => setLight(!light)}>
        {light ? '关' : '开'}
      </button>
    </>
  )
}

export default Room
